Identifiers

Most identifiersidentifier allowed by other programming languages are also acceptable to Scheme. The precise rules for forming identifiers vary among implementations of Scheme, but in all implementations a sequence of letters, digits, and ``extended alphabetic characters'' that begins with a character that cannot begin a number is an identifier. In addition, +, -, and ... are identifiers. Here are some examples of identifiers:


\begin{scheme}
lambda q
list->vector soup
{+} V17a
<=? a34kTMNs
the-word-recursion-has-many-meanings\end{scheme}

Extended alphabetic characters may be used within identifiers as if they were letters. The following are extended alphabetic characters:


\begin{scheme}
+ - . * / < = > !\ ?\ :\ \$ \% \char''5F{} \char''26{} \char''7E{} \char''5E %
\end{scheme}

See section [*] for a formal syntax of identifiers.

Identifiers have several uses within Scheme programs:

The following identifiers are syntactic keywords, and should not be used as variables:


\begin{scheme}
=> do or
and else quasiquote
begin if quote
case lambda set!
cond let unquote
define let* unquote-splicing
delay letrec\end{scheme}

Some implementations allow all identifiers, including syntactic keywords, to be used as variables. This is a compatible extension to the language, but ambiguities in the language result when the restriction is relaxed, and the ways in which these ambiguities are resolved vary between implementations.